// components/lostshow/lostshow.js
const app = getApp();
const db = wx.cloud.database();
var sev = require('../../../../../utils/sev.js');
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    
  },
  options: {
    addGlobalClass: true,
    multipleSlots: true
  },
  /**
   * 组件的初始数据
   */
  data: {
    img: '',
    calls:'',
    content: '',
    imglist: [],

  },

  /**
   * 组件的方法列表
   */
  methods: {
    ViewImage(e) {
    
      wx.previewImage({
        urls: this.data.imglist,
        current: e.currentTarget.dataset.url
      });
    },
    toconnect(){
      var that = this;
      wx.makePhoneCall({
        phoneNumber: that.data.calls,
      })
    }
  },
  lifetimes: {
    created() {
      var that = this;
      wx.getStorage({
        key: 'sellost',
        success: function (res) {
          console.log(res.data)
          that.setData({
            content: res.data.content,
            imglist: res.data.realList,
            doc: res.data._id,
            calls:res.data.calls
          })
        }
      })
       
    }}
})
